import { defineStore } from "pinia";
import { reactive } from "vue";

export const useTalkStore= defineStore('talk',()=>{
    //这就是state
    let talkList=reactive([
        {id:1,content:'11'},
        {id:2,content:'22'},
        {id:3,content:'33'},
        {id:4,content:'44'},
    ])
    //actions 
    function showList(){
        console.log(talkList)
    }
    //不要忘记return 
    return {talkList,showList}
})